The present invention relates to a method and apparatus for boundary filtering a digital image. The invention also relates to a computer program product including a computer readable medium having recorded thereon a computer program for boundary filtering a digital image.
The publication IEEE Transactions on Image Processing, Vol. 7, No. 2, February 1998, xe2x80x9cBlocking Effect Reduction of JPEG Images by Signal Adaptive Filteringxe2x80x9d by Y. C. Lee, H. C. Kim, and H. W. Park, discloses a blocking effect reducing algorithm for JPEG decompressed images. This algorithm uses a signal adaptive filtering as well as a corner outlier detection and replacement scheme. A xe2x80x9ccorner outlierxe2x80x9d is a term used by Lee et al to describe a blocking artifact at corner pixels. The signal adaptive filtering is based on the edge information, which is generated by a gradient operation and by an adaptive threshold scheme. The signal adaptive filtering consists of one-dimensional (1-D) smoothing filtering for the edge area and a two-dimensional (2-D) adaptive average filter for the monotone area. A noticeable corner outlier is smoothed by a corner outlier detection and replacement scheme. However such a scheme suffers from the disadvantage in that it is computationally intensive, requires extra buffering and many memory read/write accesses.
There are a number of other image compression methods, which offer better rate-distortion performance than JPEG. One such method is a discrete wavelet transform (DWT) scheme. Traditionally this scheme has been applied to the whole image. However, for certain applications it is desirable to tile the image and independently encode each tile or block of the image with the DWT. Normally, the blocks in such a scheme are much greater in size than the blocks in JPEG, to facilitate better rate-distortion performance. However, these image compression methods also suffer from blocking artifacts at high compression ratios.
It is an object of the present invention to ameliorate one or more disadvantages of the prior art.
One or more exemplary aspects of the invention are listed below, but are not limited thereto.
According to one aspect of the invention there is provided a method for boundary filtering a digital image, wherein the digital image includes a plurality of adjacent decompressed blocks having one or more boundaries therebetween, which blocks each include a plurality of rows and columns of pixels x[i], and the rows and/or columns of the pixels disposed on opposite sides of the boundaries each include a first line of pixels x[xe2x88x92n], . . . x[xe2x88x921] and a second line of pixels x[0] . . . x[m] respectively, wherein the pixels x[xe2x88x921] and x[0] are endpoints of the first and second pixel lines and are adjacently disposed, and wherein the method includes performing the following the steps for each of said first and second lines;
(i) determining a plurality of weighted sums of at least the difference between the values of the pixels x[xe2x88x921] and x[0]; and
(ii) replacing, for each pixel x[i], the pixel value of x[i] with the sum of the pixel value of x[i] and a respective said weighted sum, where i=xe2x88x92n, . . . ,m; and
wherein m+n is less than the number of rows in the block and/or is less than the number of columns in the block.
According to another aspect of the invention there is provided an apparatus for boundary filtering a digital image, wherein the digital image includes a plurality of adjacent decompressed blocks having one or more boundaries therebetween, which blocks each include a plurality of rows and columns of pixels x[i], and the rows and/or columns of the pixels disposed on opposite sides of the boundaries each include a first line of pixels x[xe2x88x92n], . . . x[xe2x88x921] and a second line of pixels x[0] . . . x[m] respectively, wherein the pixels x[xe2x88x921] and x[0] are endpoints of the first and second pixel lines and are adjacently disposed, and wherein the apparatus includes;
means for determining a plurality of weighted sums of at least the difference between the values of the pixels x[xe2x88x921] and x[0]; and
means for replacing, for each pixel x[i], the pixel value of x[i] with the sum of the pixel value of x[i] and a respective said weighted sum, where i=xe2x88x92n, . . . ,m; and
wherein m+n is less than the number of rows in the block and/or is less than the number of columns in the block.
According to another aspect of the invention there is provided a computer program product including a computer readable medium having recorded thereon a computer program for boundary filtering a digital image, wherein the digital image includes a plurality of adjacent decompressed blocks having one or more boundaries therebetween, which blocks each include a plurality of rows and columns of pixels x[i], and the rows and/or columns of the pixels disposed on opposite sides of the boundaries each include a first line of pixels x[xe2x88x92n], . . . x[xe2x88x921] and a second line of pixels x[0] . . . x[m] respectively, wherein the pixels x[xe2x88x921] and x[0] are endpoints of the first and second pixel lines and are adjacently disposed, said computer program product including:
means for determining a plurality of weighted sums of at least the difference between the values of the pixels x[xe2x88x921] and x[0]; and
means for replacing, for each pixel x[i], the pixel value of x[i] with the sum of the pixel value of x[i] and a respective said weighted sum, where i=xe2x88x92n, . . . ,m; and
wherein m+n is less than the number of rows in the block and/or is less than the number of columns in the block.